package cn.wolfcode.wolf2w.business.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {

    @Bean
    public Queue queue(){
        return new Queue("esQueue");
    }

    @Bean
    public TopicExchange esTopicExchange(){
        return new TopicExchange("esTopicExchange");
    }

    @Bean
    public Binding esBinding(){
        return new Binding("esQueue",Binding.DestinationType.QUEUE,"esTopicExchange","esKey",null);
    }

}
